package com.smedi.ismedi.constructionproject.core.domain.repository;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.constructionproject.core.application.query.vo.ProjectDetailVo;
import com.smedi.ismedi.constructionproject.core.domain.aggregatemodel.Project;
import com.smedi.ismedi.constructionproject.core.domain.aggregatemodel.ProjectBasic;
import com.smedi.ismedi.constructionproject.core.domain.aggregatemodel.ProjectWithDing;
import com.smedi.ismedi.constructionproject.core.domain.aggregatemodel.dto.ProjectCountQuery;
import com.smedi.ismedi.constructionproject.core.domain.aggregatemodel.dto.ProjectQuery;

import java.util.List;

/**
 * @Author: xulinjun
 * @Date: 2021-6-8 10:56
 */
public interface ProjectBasicRepository {
    ProjectBasic selectByProjectId(Long projectId);

    List<ProjectBasic> selectByProvinceName(String provinceName);

    int selectProjectCodeCount(String projectCode, Long projectId);

    ProjectBasic doInsert(ProjectBasic data);

    ProjectBasic doUpdate(ProjectBasic data);

    int selectProjectCountByHrOrganizationId(Long hrOrganizationId);

    List<ProjectBasic> selectProjectList();

    List<ProjectBasic> selectProjectListWithToken();

    void doDeleteByProjectId(Long projectId);

    List<ProjectBasic> selectByHrOrganizationId(Long hrOrganizationId);

    List<ProjectBasic> getQueryProjectBasicListByApp(String appSeach,List<Long> ids);

    Project getProjectOne(ProjectQuery projectQuery);

    List<Project> getProjectList(ProjectQuery projectQuery);

    Page<ProjectDetailVo> getProjectDetailPage(ProjectQuery projectQuery);

    List<ProjectDetailVo> getProjectDetailList(ProjectQuery projectQuery);

    List<ProjectBasic> selectByProjectIds(List<Long> projectIds);

    long updateProjectByProjectName(String projectName,String dingDeptKey);

    List<ProjectWithDing> selectByOrgId(Long orgId);

    ProjectWithDing selectById(Long id);
    Integer getProjectCount (ProjectCountQuery projectCountQuery);

    Boolean updateProjectBasic(ProjectBasic projectBasic);
}
